home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet internetowy / Czytniki RSS / RSS Bandit 1.3.0.42 / RssBandit Installer.msi / _172FF5180BC61D3C6D240F14338A23AA / _4B57F437D3974F47B4097B73D98DCF99 < prev    next >
Text File  |  2005-04-12  |  16KB  |  425 lines

  1.         <xsl:stylesheet version='1.0' 
  2.                 xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
  3.                 xmlns:content = 'http://purl.org/rss/1.0/modules/content/'
  4.                 xmlns:xhtml='http://www.w3.org/1999/xhtml'
  5.                 xmlns:slash='http://purl.org/rss/1.0/modules/slash/'
  6.                 xmlns:dc='http://purl.org/dc/elements/1.1/' 
  7.                 exclude-result-prefixes='content slash dc'>
  8.           
  9.           <xsl:output method='xml' indent='yes' /> 
  10.  
  11.  
  12.             <!-- channel newspaper -->
  13.           <xsl:template match="newspaper[@type='channel']">
  14.             <html>
  15.               <head>
  16.             <title><xsl:value-of disable-output-escaping='yes' select='//channel/title'/></title>
  17.             <base href="{//channel/link}" />
  18.             <style><![CDATA[
  19.             body        { font-family:Verdana;Arial; font-size:11pt; margin:0pt; padding:0pt; }
  20.             table.header {
  21.             font-family:Verdana;
  22.             Arial;
  23.             color:#000000;
  24.             cell-padding:2pt;
  25.             background:#ECE9D8;
  26.             width:100%;
  27.             height:30px;
  28.             border-top:1px solid #FFFFFF;
  29.             border-bottom:1px solid #999999;
  30.             border-right-width: 1px;
  31.             border-left-width: 1px;
  32.             border-right-style: solid;
  33.             border-left-style: solid;
  34.             border-right-color: #999999;
  35.             border-left-color: #FFFFFF;
  36.             }
  37.             .headercolumns {
  38.             font-family:Verdana;
  39.             Arial;
  40.             color:#000000;
  41.             cell-padding:0pt;
  42.             background:#ECE9D8;
  43.             width:100%;
  44.             height:30px;
  45.             border-top:0px solid #FFFFFF;
  46.             border-bottom:0px solid #999999;
  47.             border-right-width: 0px;
  48.             border-left-width: 0px;
  49.             border-right-style: solid;
  50.             border-left-style: solid;
  51.             }
  52.             .title        {
  53.             font-size:9pt;
  54.             font-weight: normal;
  55.             }
  56.             .date        { font-size:9pt; }
  57.             div.content { font-family:Verdana, Arial;font-size:10pt;margin:10pt;padding:5pt;  }
  58.             td.title a:link      { color:#0000CC;text-decoration:none;font-weight:normal; }
  59.             td.title a:visited   { color:#0000CC;text-decoration:none; }
  60.             td.title a:hover         { color:#0000FF;text-decoration:underline;font-weight:normal; }
  61.             a:link      { color:#0000CC;text-decoration:none;font-weight:normal; }
  62.             a:visited   {
  63.             color:#0000CC;
  64.             text-decoration:none;
  65.             }
  66.             a:hover        { color:#0000FF;text-decoration:underline;font-weight:normal; }
  67.             ]]></style>
  68.               </head>
  69.               <body>
  70.             <table height="100%" width="100%">
  71.               <tr>
  72.                 <td height="100%" width="100%" valign="top">
  73.                   <xsl:if test="//channel/image">
  74.                 <div style="FLOAT: right">
  75.                   <a href="{//channel/image/link}" title="{//channel/image/title}"><img src="{//channel/image/url}"  alt="{//channel/image/title}" border="0">
  76.                   <xsl:if test="//channel/image/width!=''"><xsl:attribute name="width"><xsl:value-of select="//channel/image/width"/></xsl:attribute></xsl:if>
  77.                   <xsl:if test="//channel/image/height!=''"><xsl:attribute name="height"><xsl:value-of select="//channel/image/height"/></xsl:attribute></xsl:if>
  78.                   </img></a>
  79.                 </div>
  80.                   </xsl:if>                  
  81.                   <xsl:for-each select='//item'>
  82.                 <table class='header'>
  83.               <tr>               
  84.                 <td width='100%' align='right'>
  85.                   <table class='headercolumns' border='0' cellpadding='0' cellspacing='0'>
  86.                 <tr> 
  87.                   <td class='title' width='49%' align='left' valign='top'><strong>From:</strong><xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text><xsl:choose>
  88.                   <xsl:when test='current()/author'>
  89.                     <xsl:value-of select='current()/author'/>
  90.                   </xsl:when>
  91.                   <xsl:when test='current()/dc:creator'>
  92.                     <xsl:value-of select='current()/dc:creator'/>
  93.                   </xsl:when>    
  94.                   <xsl:otherwise>
  95.                     <xsl:value-of select='//channel/title'/>
  96.                   </xsl:otherwise>            
  97.                 </xsl:choose>
  98.                   </td>
  99.                   <td class='date' width='51%' valign='top' align='right'><b><xsl:value-of select='current()/pubDate' /></b></td>
  100.                 </tr>
  101.                 <tr> 
  102.                   <td colspan='2' class='title' align='left' valign='bottom'><strong>Subject:</strong><xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text><xsl:value-of disable-output-escaping='yes' select='current()/title' /> 
  103.                 </td>
  104.               </tr>
  105.             </table>
  106.               </td>  
  107.             </tr>
  108.             <!-- <tr> 
  109.             <td colspan="2" class='title'>
  110.             </td>
  111.             </tr>-->
  112.           </table>
  113.           <div class='content'>
  114.             <xsl:choose>
  115.               <xsl:when test='current()/xhtml:body'>
  116.             <xsl:copy-of select='current()/xhtml:body'/>
  117.               </xsl:when>
  118.               <xsl:when test='current()/content:encoded'>
  119.             <xsl:value-of  disable-output-escaping='yes' select='current()/content:encoded'/>
  120.               </xsl:when>
  121.               <xsl:otherwise>
  122.             <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
  123.               </xsl:otherwise>
  124.             </xsl:choose>
  125.             <br/><br/>
  126.             <a href='{current()/link}'>Read on...</a> 
  127.             <xsl:choose>
  128.               <xsl:when test='current()/comments'> <xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  129.               <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  130.               <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  131.             </xsl:when> 
  132.             <xsl:when test='current()/slash:comments'>
  133.               <xsl:value-of select='current()/slash:comments'/> Comments...    
  134.             </xsl:when> 
  135.           </xsl:choose>
  136.         </div>
  137.             </xsl:for-each>
  138.                 </td>
  139.               </tr>
  140.             </table>
  141.         </body></html>
  142.           </xsl:template>
  143.  
  144.                <!-- channel group newspaper -->
  145.         <xsl:template match="newspaper[@type='group']">
  146.             <html>
  147.               <head>
  148.             <title><xsl:value-of disable-output-escaping='yes' select='title'/></title>
  149.             <!-- <base href="{//item/link}" /> -->
  150.             <style><![CDATA[
  151.             body        { font-family:Verdana;Arial; font-size:11pt; margin:0pt; padding:0pt; }
  152.             table.header {
  153.             font-family:Verdana;
  154.             Arial;
  155.             color:#000000;
  156.             cell-padding:2pt;
  157.             background:#ECE9D8;
  158.             width:100%;
  159.             height:30px;
  160.             border-top:1px solid #FFFFFF;
  161.             border-bottom:1px solid #999999;
  162.             border-right-width: 1px;
  163.             border-left-width: 1px;
  164.             border-right-style: solid;
  165.             border-left-style: solid;
  166.             border-right-color: #999999;
  167.             border-left-color: #FFFFFF;
  168.             }
  169.             .headercolumns {
  170.             font-family:Verdana;
  171.             Arial;
  172.             color:#000000;
  173.             cell-padding:0pt;
  174.             background:#ECE9D8;
  175.             width:100%;
  176.             height:30px;
  177.             border-top:0px solid #FFFFFF;
  178.             border-bottom:0px solid #999999;
  179.             border-right-width: 0px;
  180.             border-left-width: 0px;
  181.             border-right-style: solid;
  182.             border-left-style: solid;
  183.             }
  184.             .title        {
  185.             font-size:9pt;
  186.             font-weight: normal;
  187.             }
  188.             .date        { font-size:9pt; }
  189.             div.content { font-family:Verdana, Arial;font-size:10pt;margin:10pt;padding:5pt;  }
  190.             td.title a:link      { color:#0000CC;text-decoration:none;font-weight:normal; }
  191.             td.title a:visited   { color:#0000CC;text-decoration:none; }
  192.             td.title a:hover         { color:#0000FF;text-decoration:underline;font-weight:normal; }
  193.             a:link      { color:#0000CC;text-decoration:none;font-weight:normal; }
  194.             a:visited   {
  195.             color:#0000CC;
  196.             text-decoration:none;
  197.             }
  198.             a:hover        { color:#0000FF;text-decoration:underline;font-weight:normal; }
  199.             ]]></style>
  200.               </head>
  201.               <body>
  202.             <table height="100%" width="100%">
  203.                 <xsl:for-each select="//channel">
  204.               <tr>
  205.                 <td height="100%" width="100%" valign="top">
  206.                   <xsl:choose>
  207.                 <xsl:when test="current()/image">
  208.                 <div style="FLOAT: right">
  209.                   <a href="{current()/image/link}" title="{current()/image/title}"><img src="{current()/image/url}"  alt="{current()/image/title}" border="0">
  210.                   <xsl:if test="current()/image/width!=''"><xsl:attribute name="width"><xsl:value-of select="current()/image/width"/></xsl:attribute></xsl:if>
  211.                   <xsl:if test="current()/image/height!=''"><xsl:attribute name="height"><xsl:value-of select="current()/image/height"/></xsl:attribute></xsl:if>
  212.                   </img></a>
  213.                 </div>
  214.                   </xsl:when>
  215.                       <xsl:otherwise>
  216.                   <div class="title" style="FLOAT: right">
  217.                       <a href="{current()/link}"><xsl:value-of disable-output-escaping="yes" select="current()/title" /></a>
  218.                 </div>
  219.             </xsl:otherwise>
  220.             </xsl:choose>
  221.                   <xsl:for-each select='current()//item'>
  222.                 <table class='header'>
  223.               <tr>               
  224.                 <td width='100%' align='right'>
  225.                   <table class='headercolumns' border='0' cellpadding='0' cellspacing='0'>
  226.                 <tr> 
  227.                   <td class='title' width='49%' align='left' valign='top'><strong>From:</strong><xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text><xsl:choose>
  228.                   <xsl:when test='current()/author'>
  229.                     <xsl:value-of select='current()/author'/>
  230.                   </xsl:when>
  231.                   <xsl:when test='current()/dc:creator'>
  232.                     <xsl:value-of select='current()/dc:creator'/>
  233.                   </xsl:when>    
  234.                   <xsl:otherwise>
  235.                     <xsl:value-of disable-output-escaping="yes" select='current()/title'/>
  236.                   </xsl:otherwise>            
  237.                 </xsl:choose>
  238.                   </td>
  239.                   <td class='date' width='51%' valign='top' align='right'><b><xsl:value-of select='current()/pubDate' /></b></td>
  240.                 </tr>
  241.                 <tr> 
  242.                   <td colspan='2' class='title' align='left' valign='bottom'><strong>Subject:</strong><xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text><xsl:value-of disable-output-escaping='yes' select='current()/title' /> 
  243.                 </td>
  244.               </tr>
  245.             </table>
  246.               </td>  
  247.             </tr>
  248.             <!-- <tr> 
  249.             <td colspan="2" class='title'>
  250.             </td>
  251.             </tr>-->
  252.           </table>
  253.           <div class='content'>
  254.             <xsl:choose>
  255.               <xsl:when test='current()/xhtml:body'>
  256.             <xsl:copy-of select='current()/xhtml:body'/>
  257.               </xsl:when>
  258.               <xsl:when test='current()/content:encoded'>
  259.             <xsl:value-of  disable-output-escaping='yes' select='current()/content:encoded'/>
  260.               </xsl:when>
  261.               <xsl:otherwise>
  262.             <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
  263.               </xsl:otherwise>
  264.             </xsl:choose>
  265.             <br/><br/>
  266.             <a href='{current()/link}'>Read on...</a> 
  267.             <xsl:choose>
  268.               <xsl:when test='current()/comments'> <xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  269.               <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  270.               <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  271.             </xsl:when> 
  272.             <xsl:when test='current()/slash:comments'>
  273.               <xsl:value-of select='current()/slash:comments'/> Comments...    
  274.             </xsl:when> 
  275.           </xsl:choose>
  276.         </div>
  277.             </xsl:for-each>
  278.                 <hr /></td>
  279.               </tr>
  280.                 </xsl:for-each>
  281.             </table>
  282.         </body></html>
  283.           </xsl:template>
  284.  
  285.           <!-- single news item -->
  286.           <xsl:template match="newspaper[@type='newsitem']">
  287.             <html>
  288.               <head>
  289.             <title><xsl:value-of disable-output-escaping='yes' select='//item/title'/></title>
  290.             <base href="{//item/link}" />
  291.             <style><![CDATA[
  292.             body        { font-family:Verdana;Arial; font-size:11pt; margin:0pt; padding:0pt; }
  293.             table.header {
  294.             font-family:Verdana;
  295.             Arial;
  296.             color:#000000;
  297.             cell-padding:2pt;
  298.             background:#ECE9D8;
  299.             width:100%;
  300.             height:30px;
  301.             border-top:1px solid #FFFFFF;
  302.             border-bottom:1px solid #999999;
  303.             border-right-width: 1px;
  304.             border-left-width: 1px;
  305.             border-right-style: solid;
  306.             border-left-style: solid;
  307.             border-right-color: #999999;
  308.             border-left-color: #FFFFFF;
  309.             }
  310.             .headercolumns {
  311.             font-family:Verdana;
  312.             Arial;
  313.             color:#000000;
  314.             cell-padding:0pt;
  315.             background:#ECE9D8;
  316.             width:100%;
  317.             height:30px;
  318.             border-top:0px solid #FFFFFF;
  319.             border-bottom:0px solid #999999;
  320.             border-right-width: 0px;
  321.             border-left-width: 0px;
  322.             border-right-style: solid;
  323.             border-left-style: solid;
  324.             }
  325.             .title        {
  326.             font-size:9pt;
  327.             font-weight: normal;
  328.             }
  329.             .date        { font-size:9pt; }
  330.             div.content { font-family:Verdana, Arial;font-size:10pt;margin:10pt;padding:5pt;  }
  331.             td.title a:link      { color:#0000CC;text-decoration:none;font-weight:normal; }
  332.             td.title a:visited   { color:#0000CC;text-decoration:none; }
  333.             td.title a:hover         { color:#0000FF;text-decoration:underline;font-weight:normal; }
  334.             a:link      { color:#0000CC;text-decoration:none;font-weight:normal; }
  335.             a:visited   {
  336.             color:#0000CC;
  337.             text-decoration:none;
  338.             }
  339.             a:hover        { color:#0000FF;text-decoration:underline;font-weight:normal; }
  340.             ]]></style>
  341.               </head>
  342.               <body>
  343.             <table class='header'>
  344.               <tr> 
  345.                 <td class='image'>
  346.                   <xsl:if test='//channel/image'>
  347.                 <a href='{//channel/image/link}'>
  348.                   <img align='left' border='0' src='{//channel/image/url}' alt='{//channel/image/title}' 
  349.                        width='{//channel/image/width}' height='{//channel/image/height}'>
  350.                     <xsl:attribute name='width'>
  351.                       <xsl:choose>
  352.                     <xsl:when test='//channel/image/width'>
  353.                       <xsl:value-of select='//channel/image/width' />
  354.                     </xsl:when>
  355.                     <xsl:otherwise>88</xsl:otherwise>
  356.                       </xsl:choose>
  357.                     </xsl:attribute>
  358.                     <xsl:attribute name='height'>
  359.                       <xsl:choose>
  360.                     <xsl:when test='//channel/image/height'>
  361.                       <xsl:value-of select='//channel/image/height' />
  362.                     </xsl:when>
  363.                     <xsl:otherwise>31</xsl:otherwise>
  364.                       </xsl:choose>
  365.                     </xsl:attribute>
  366.                   </img>
  367.                 </a>
  368.                   </xsl:if>
  369.                 </td>
  370.                 <td width='100%' align='right'>
  371.                   <table class='headercolumns' border='0' cellpadding='0' cellspacing='0'>
  372.                 <tr> 
  373.                   <td class='title' width='49%' align='left' valign='top'><strong>From:</strong><xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text><xsl:choose>
  374.                   <xsl:when test='//item/author'>
  375.                     <xsl:value-of select='//item/author'/>
  376.                   </xsl:when>
  377.                   <xsl:when test='//item/dc:creator'>
  378.                     <xsl:value-of select='//item/dc:creator'/>
  379.                   </xsl:when>    
  380.                   <xsl:otherwise>
  381.                     <xsl:value-of select='//channel/title'/>
  382.                   </xsl:otherwise>            
  383.                 </xsl:choose>
  384.                   </td>
  385.                   <td class='date' width='51%' valign='top' align='right'><b><xsl:value-of select='//item/pubDate' /></b></td>
  386.                 </tr>
  387.                 <tr> 
  388.                   <td colspan='2' class='title' align='left' valign='bottom'><strong>Subject:</strong><xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text><xsl:value-of disable-output-escaping='yes' select='//item/title' /> 
  389.                 </td>
  390.               </tr>
  391.             </table>
  392.               </td>  
  393.             </tr>
  394.             <!-- <tr> 
  395.             <td colspan="2" class='title'>
  396.             </td>
  397.             </tr>-->
  398.           </table>
  399.           <div class='content'>
  400.             <xsl:choose>
  401.               <xsl:when test='//item/xhtml:body'>
  402.             <xsl:copy-of select='//item/xhtml:body'/>
  403.               </xsl:when>
  404.               <xsl:when test='//item/content:encoded'>
  405.             <xsl:value-of  disable-output-escaping='yes' select='//item/content:encoded'/>
  406.               </xsl:when>
  407.               <xsl:otherwise>
  408.             <xsl:value-of disable-output-escaping='yes' select='//item/description'/>
  409.               </xsl:otherwise>
  410.             </xsl:choose>
  411.             <br/><br/>
  412.             <a href='{//item/link}'>Read on...</a> 
  413.             <xsl:choose>
  414.               <xsl:when test='//item/comments'> <xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  415.               <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='//item/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  416.               <xsl:value-of select='//item/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  417.             </xsl:when> 
  418.             <xsl:when test='//item/slash:comments'>
  419.               <xsl:value-of select='//item/slash:comments'/> Comments...    
  420.             </xsl:when> 
  421.           </xsl:choose>
  422.         </div>
  423.         </body></html>
  424.           </xsl:template>
  425.         </xsl:stylesheet>